package treqs.model;

// Generated 2009-jul-12 14:12:54 by Hibernate Tools 3.2.4.GA
 
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Requirements generated by hbm2java
 */
@Entity
@Table(name = "requirements", catalog = "treqs")
public class Requirements implements java.io.Serializable {

	private Integer id;
	private Requirementstatuses requirementstatuses;
	private Requirementpriorities requirementpriorities;
	private String uid;
	private String name;
	private String description;
	private String rationale;
	private String comment;
	private int revision;
	private Date creationTimestamp;
	private Date deletionTimestamp;
	private Date editTimestamp;
	private byte[] editLog;
	private Taskstorequirements taskstorequirements;

	public Requirements() {
	}

	public Requirements(Requirementstatuses requirementstatuses,
			Requirementpriorities requirementpriorities, String uid,
			String name, int revision, Date creationTimestamp,
			Date deletionTimestamp, Date editTimestamp) {
		this.requirementstatuses = requirementstatuses;
		this.requirementpriorities = requirementpriorities;
		this.uid = uid;
		this.name = name;
		this.revision = revision;
		this.creationTimestamp = creationTimestamp;
		this.deletionTimestamp = deletionTimestamp;
		this.editTimestamp = editTimestamp;
	}

	public Requirements(Requirementstatuses requirementstatuses,
			Requirementpriorities requirementpriorities, String uid,
			String name, String description, String rationale, String comment,
			int revision, Date creationTimestamp, Date deletionTimestamp,
			Date editTimestamp, byte[] editLog,
			Taskstorequirements taskstorequirements) {
		this.requirementstatuses = requirementstatuses;
		this.requirementpriorities = requirementpriorities;
		this.uid = uid;
		this.name = name;
		this.description = description;
		this.rationale = rationale;
		this.comment = comment;
		this.revision = revision;
		this.creationTimestamp = creationTimestamp;
		this.deletionTimestamp = deletionTimestamp;
		this.editTimestamp = editTimestamp;
		this.editLog = editLog;
		this.taskstorequirements = taskstorequirements;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "status", nullable = false)
	public Requirementstatuses getRequirementstatuses() {
		return this.requirementstatuses;
	}

	public void setRequirementstatuses(Requirementstatuses requirementstatuses) {
		this.requirementstatuses = requirementstatuses;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "priority", nullable = false)
	public Requirementpriorities getRequirementpriorities() {
		return this.requirementpriorities;
	}

	public void setRequirementpriorities(
			Requirementpriorities requirementpriorities) {
		this.requirementpriorities = requirementpriorities;
	}

	@Column(name = "UID", nullable = false, length = 45)
	public String getUid() {
		return this.uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	@Column(name = "name", nullable = false, length = 65535)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "description", length = 65535)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "rationale", length = 65535)
	public String getRationale() {
		return this.rationale;
	}

	public void setRationale(String rationale) {
		this.rationale = rationale;
	}

	@Column(name = "comment", length = 65535)
	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	@Column(name = "revision", nullable = false)
	public int getRevision() {
		return this.revision;
	}

	public void setRevision(int revision) {
		this.revision = revision;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "creationTimestamp", nullable = false, length = 19)
	public Date getCreationTimestamp() {
		return this.creationTimestamp;
	}

	public void setCreationTimestamp(Date creationTimestamp) {
		this.creationTimestamp = creationTimestamp;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "deletionTimestamp", nullable = false, length = 19)
	public Date getDeletionTimestamp() {
		return this.deletionTimestamp;
	}

	public void setDeletionTimestamp(Date deletionTimestamp) {
		this.deletionTimestamp = deletionTimestamp;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "editTimestamp", nullable = false, length = 19)
	public Date getEditTimestamp() {
		return this.editTimestamp;
	}

	public void setEditTimestamp(Date editTimestamp) {
		this.editTimestamp = editTimestamp;
	}

	@Column(name = "editLog")
	public byte[] getEditLog() {
		return this.editLog;
	}

	public void setEditLog(byte[] editLog) {
		this.editLog = editLog;
	}

	@OneToOne(fetch = FetchType.LAZY, mappedBy = "requirements")
	public Taskstorequirements getTaskstorequirements() {
		return this.taskstorequirements;
	}

	public void setTaskstorequirements(Taskstorequirements taskstorequirements) {
		this.taskstorequirements = taskstorequirements;
	}

}
